<?php
/**
 * Yii框架公共设置文件
 * @property language      语言包文件
 * @property preload       优先加载数库
 * @property runtimePath   设置日志文件路径
 * @property extensionPath 设置公共扩展库路径
 * @property charset       页面字符编码
 * @property import        设置include搜索路径，优先从尾部向上搜索
 * @property components    设置系统组件
 */

$log = array( array( 'class'=>'CFileLogRoute', 'levels'=>'error,warning') );
if ( YII_DEBUG || file_exists('/.debug') ) {
    $log[] = array( 'class'=>'CWebLogRoute', 'levels'=>'error,warning,info,notie' );
}
return array(
        'language' => 'zh_cn',
        'preload'  => array( 'log','session' ),
        'runtimePath'=>DXW_PRO_LOG_DIR,
        'extensionPath'=>DXW_COMMON_DIR,
        'charset' => 'UTF-8',
        'homeUrl' => HOME_URL,
        'import'   => array(
            'application.models.*',
            'application.models.product.*',
            'application.models.lock.*',
            'application.models.user.*',
            'application.components.*',
            'ext.modules.*',
            'ext.components.*',
        ),

        'components' => array(
            'log' => array(
                'class'  => 'CLogRouter',
                'routes' => $log,
            ),

            'urlManager' => array(
                'urlFormat'      => 'path',
                'showScriptName' => false,
                'urlSuffix'      => '.html',
            ),
                
            'cache'=>array(
                    'class'=>'CFileCache',
                    'cachePath'=>DXW_PRO_CACHE_DIR,
            ),
            //session贡献处理    只用memcache
//            'memcache' => array(
//                'class'   => 'CscCache',
//            	'keyPrefix'=>DOMAIN,
//                'servers' => array(
//                    array( 'host' => '10.8.23.80', 'port'=>11211 ),
//                ),
//            ),
        	//**只用于数组 对象  操作	
        	'redis' => array(
                'class'   => 'CscRedis',
                'servers' => array(
                    array( 'host' => DXW_REDIS_ADDR, 'port'=>DXW_REDIS_PORT ,"pwd"=>DXW_REDIS_PWD),
                ),
            ),
           'session' => array(
                'timeout'  => DXW_SESSION_TIMEOUT,
                'savePath' => DXW_SESSION_DIR,
            ),
//        	'cookies'=>array(
//        		'class'   => 'CscCookie',
//        		'expire'  => 2592000,
//            ),
        )
);
